using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace PropellentNet
{
    
    static class Properties
    {
        
        public struct SpinProperty
        {
            public SpinProperty(string PropertyName, object PropertyValue)
            {
                Name = PropertyName;
                Value = PropertyValue;
            }
            public string Name;
            public object Value;
        }
        
        private static System.Collections.Hashtable m_SpinProperties = new System.Collections.Hashtable();
        
        public static void AddProperty(string TypeName, SpinProperty Propertie)
        {
            if (!m_SpinProperties.Contains(TypeName))
            {
                Hashtable holdHT = new Hashtable();
                holdHT.Add(Propertie.Name, Propertie.Value);
                m_SpinProperties.Add(TypeName, holdHT);
            }
            else
                ((Hashtable)m_SpinProperties[TypeName]).Add(Propertie.Name, Propertie.Value);
        }

        public static object GetProperty(string TypeName, string PropertyName)
        {
            return ((Hashtable)m_SpinProperties[TypeName])[PropertyName];
        }
        public static void SetProperty(string TypeName, string PropertyName, object PropertyValue)
        {
            ((Hashtable)m_SpinProperties[TypeName])[PropertyName] = PropertyValue;
        }

    }
    
}
